package com.aiden.entity;

import java.io.Serializable;
import java.util.Date;

public class User implements Serializable {
    //与数据库表对应的字段属性
    private Integer id;//主键编号
    private String loginId;//账号
    private String loginPwd;//密码
    private String name;//姓名
    private String address;//地址
    private String phone;//电话
    private String mail;//邮箱
    private Date birthday;//出生日期
    private String registerIp;//注册IP
    private Date registerTime;//注册时间

    private  UserRole userRole;
    private  UserState userState;

    public User() {
    }

    public User(Integer id, String loginId, String loginPwd, String name) {
        this.id = id;
        this.loginId = loginId;
        this.loginPwd = loginPwd;
        this.name = name;
    }

    public User(String loginId, String loginPwd, String name, String address, String phone, String mail, Date birthday) {
        this.loginId = loginId;
        this.loginPwd = loginPwd;
        this.name = name;
        this.address = address;
        this.phone = phone;
        this.mail = mail;
        this.birthday = birthday;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", loginId='" + loginId + '\'' +
                ", loginPwd='" + loginPwd + '\'' +
                ", name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", phone='" + phone + '\'' +
                ", mail='" + mail + '\'' +
                ", birthday=" + birthday +
                ", registerIp='" + registerIp + '\'' +
                ", registerTime=" + registerTime +
                ", userRole=" + userRole +
                ", userState=" + userState +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLoginId() {
        return loginId;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getRegisterIp() {
        return registerIp;
    }

    public void setRegisterIp(String registerIp) {
        this.registerIp = registerIp;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public UserRole getUserRole() {
        return userRole;
    }

    public void setUserRole(UserRole userRole) {
        this.userRole = userRole;
    }

    public UserState getUserState() {
        return userState;
    }

    public void setUserState(UserState userState) {
        this.userState = userState;
    }
}
